<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>标本报送</title>
		<meta http-equiv="expires" content="0">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<link rel="stylesheet" href="../../../css/reset.css" />
		<link rel="stylesheet" href="../../../css/mui.min.css" />
		<link rel="stylesheet" href="../../../css/iconfont.css" />
		<link rel="stylesheet" href="../../../css/cmms.css" />
		<link rel="stylesheet" href="../../../css/sale/sampDelivery/sampDelivery.css" />
	</head>
	<body>
		<div id="sampDelivery" class="mui-content center panel"  v-cloak>
			<!--搜素-->
			<div class="topSearch">
				<input type="text" v-model="doctorName" :placeholder="icon"  />
				<button class="btn-primary right" @tap="search" v-show="!isBtnShow">搜索</button>
				<span class="right" @tap="apply" v-show="isBtnShow"><i class="iconfont icon-wuliaoguanli"></i>报送</span>
			</div>
			<div class="main">
				<div class="panel" v-for="infos in infoList">
					<ul>
						<li class="right"><span class="delivery">{{infos.status+''|formatSampDelivery}}</span></li>
						<li class="hosp" v-for="info in infos.list">
							<p class="hospitalName">
								<span>{{info.partnerHospitalName}}</span>
							</p>
							<p v-for="item in info.list"><span>条形码：{{item.specimenBarcode}}</span><span>试管数目：{{item.specimenNum}}</span></p>
						</li>
						<li v-show="infos.deliveryType==2">
							<p><span>收件人:{{infos.receiverName}}</span><span>{{infos.receiverMobile}}</span></p>
							<p>收件地址:{{infos.receiveAddress}}</p>
						</li>
						<li>
							<p>
								<span class="time">{{infos.applyTime|replaceT}}</span>
								<span class="btn-detail tracking" v-if="infos.deliveryType==2" @tap="logistics(infos.expressCompanyCode,infos.expressNo)">物流跟踪</span>
								<!--<span class="btn-detail tracking" @tap="logistics(info.expressCompanyCode,info.expressNo)">物流跟踪</span>-->
							</p>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/vue.js"></script>
		<script src="../../../js/cmms.js?time=3333"></script>
		<script>
			new Vue({
				el:"#sampDelivery",
				data(){
					return{
						doctorName:'',
						isBtnShow:true,
						icon:'请输入医院名称 \ue604',
						infoList:[]
					}
				},
				watch:{
					doctorName:function(){
						if(this.doctorName!=''){
							this.isBtnShow = false;
						}else{
							this.isBtnShow = true;
							this.search();
						}
					}
				},
				mounted(){
//					var vConsole = new VConsole();
					this.init();
				},
				methods:{
					init(){
						let _this=this;
						AT.muiAjax('/partner-sale/apply/getPartnerSpecimenDelivery','post',{
							 name:_this.doctorName
						},function(realData){
							_this.infoList = realData;
							console.log(realData);
						});
					},
					search(){
						let _this = this;
						AT.muiAjax('/partner-sale/apply/getPartnerSpecimenDelivery','post',{
							 name:_this.doctorName
						},function(realData){
							_this.infoList = realData;
							console.log(realData);
						});
					},
					//申请
					apply(){
						location.href = "saveDelivery.html";	
					},
					logistics(expressCompanyCode,expressNo){
//						location.href = "https://m.kuaidi100.com/index_all.html?type=shentong&postid=&callbackurl=http:www.baidu.com#result";
						location.href = "https://m.kuaidi100.com/index_all.html?type="+expressCompanyCode+"&postid="+expressNo+"&callbackurl=https://lis.ulabcare.com/ant-dev/pages/sale/sampDelivery/sampDelivery.html#result";
					}
				}	
			})
		</script>
	</body>
</html>

